import{useNavigate}from"react-router-dom"
function Home(){
    const navigate=useNavigate();//创造一个路由实例
    return(
        <div>
        <h2>Home Page</h2>
        <button onClick={()=>{navigate('/user?id=1')}}>去用户界面</button>
        </div>
    )
}
export default Home;
